﻿namespace MauiProject.Model.LinkFilePageModel;

// 对应的是表单组件的IsDisabled属性
// true：不可用，false：可用
public class DrawFormAbleControl {
    public string CurrentModeId { get; set; } = "0";

    public bool CurrentDic { get; set; } // 当前目录name是否可用

    public bool Select { get; set; } = true; // 选择框是否可用

    public bool Name { get; set; } = true; // 新建文件名字输入框是否可用

    public bool Button { get; set; } // 按钮是否可用

    public string ButtonText { get; set; } = "重命名"; // 按钮的文本

    public void RenameMode() {
        CurrentModeId = "0";
        ButtonText = "重命名";
        Button = false;
        CurrentDic = false;
        Select = true;
        Name = true;
    }

    public void AddMode() {
        CurrentModeId = "1";
        ButtonText = "添加";
        Button = false;
        CurrentDic = true;
        Select = false;
        Name = false;
    }



    public void DeleteMode() {
        CurrentModeId = "2";
        ButtonText = "删除";
        Button = true;
        CurrentDic = true;
        Select = true;
        Name = true;
    }
}